<?php

class Animal {
    public $name = 'Animal';
    public function shout(){
        echo '动物叫';
    }
}

class Dog {
    public $name = 'Dog';
    public $owner = 'Lisi';
    public function shout(){
        echo '狗叫';
    }
    public function swim(){
        echo '狗会游泳';
    }
}

class Cat {
    public $name = 'Cat';
    public $owner = 'Wangwu';
    public function shout(){
        echo '猫叫';
    }
    public function eatFish(){
        echo '猫会吃鱼';
    }
    public function climbTree(){
        echo '猫会爬树';
    }

}

$dog = new Dog();
echo '<br>';
echo $dog->name;